package com.sccba.emtbusiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sccba.emtbusiness.mapper.YjczFbChannelMapper;
import com.sccba.emtbusiness.domain.YjczFbChannel;
import com.sccba.emtbusiness.service.IYjczFbChannelService;

/**
 * 发版系统关联Service业务层处理
 * 
 * @author lichh
 * @date 2024-04-17
 */
@Service
public class YjczFbChannelServiceImpl implements IYjczFbChannelService 
{
    @Autowired
    private YjczFbChannelMapper yjczFbChannelMapper;

    /**
     * 查询发版系统关联
     * 
     * @param pkId 发版系统关联主键
     * @return 发版系统关联
     */
    @Override
    public YjczFbChannel selectYjczFbChannelByPkId(Long pkId)
    {
        return yjczFbChannelMapper.selectYjczFbChannelByPkId(pkId);
    }

    /**
     * 查询发版系统关联列表
     * 
     * @param yjczFbChannel 发版系统关联
     * @return 发版系统关联
     */
    @Override
    public List<YjczFbChannel> selectYjczFbChannelList(YjczFbChannel yjczFbChannel)
    {
        return yjczFbChannelMapper.selectYjczFbChannelList(yjczFbChannel);
    }

    /**
     * 新增发版系统关联
     * 
     * @param yjczFbChannel 发版系统关联
     * @return 结果
     */
    @Override
    public int insertYjczFbChannel(YjczFbChannel yjczFbChannel)
    {
        return yjczFbChannelMapper.insertYjczFbChannel(yjczFbChannel);
    }

    @Override
    public void insertFbChannelList(Long fbId, List<YjczFbChannel> fbChannelList) {
        yjczFbChannelMapper.deleteFbChannelByFbId(fbId);
        if (null != fbChannelList && !fbChannelList.isEmpty()) {
            yjczFbChannelMapper.insertFbChannelList(fbChannelList);
        }
    }

    /**
     * 修改发版系统关联
     * 
     * @param yjczFbChannel 发版系统关联
     * @return 结果
     */
    @Override
    public int updateYjczFbChannel(YjczFbChannel yjczFbChannel)
    {
        return yjczFbChannelMapper.updateYjczFbChannel(yjczFbChannel);
    }

    /**
     * 批量删除发版系统关联
     * 
     * @param pkIds 需要删除的发版系统关联主键
     * @return 结果
     */
    @Override
    public int deleteYjczFbChannelByPkIds(Long[] pkIds)
    {
        return yjczFbChannelMapper.deleteYjczFbChannelByPkIds(pkIds);
    }

    /**
     * 删除发版系统关联信息
     * 
     * @param pkId 发版系统关联主键
     * @return 结果
     */
    @Override
    public int deleteYjczFbChannelByPkId(Long pkId)
    {
        return yjczFbChannelMapper.deleteYjczFbChannelByPkId(pkId);
    }
}
